package cc.yugu.yhdw.common.domain.basic;

import org.apache.commons.lang.time.DateFormatUtils;
/**
 * 短信发送历史实体类
 * 
 * @Date:Created in 2018/7/25 13:25
 * @Author:
 * @Modified By: zjn 2018/7/25 13:25
 */ 
public class MobileMessageHistory extends MobileMessage {
    // 短信发送表名称常量
    public final static String MOBILE_MESSAGE_TABLE_NAME = "ykdg_mobile_message_history_";

    public String tableName;
    /**
    * 获取短信发送表名称
    *
    * @Param: []
    * @Return: java.lang.String
    * @Author By: zjn 2018/7/25  13:30
    */
    public String getTableName() {
        if(tableName == null) {
            if(createTime != null) {
                tableName = String.format("%s%s", MobileMessageHistory.MOBILE_MESSAGE_TABLE_NAME, DateFormatUtils.format(createTime, "yyyyMM"));
            }
        }
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
}
